<script lang="jsx" setup>
import { ref } from 'vue';

const leftTableRef = ref(null);
const leftSearchParams = ref({});
const leftColumn = [
  {
    title: '序号',
    key: 'dataIndex',
    dataIndex: 'dataIndex',
    checked: true,
    align: 'center',
    width: 70
  },
  {
    title: '部门名称',
    key: 'deptCaption',
    dataIndex: 'deptCaption',
    width: 150,
    checked: true,
    align: 'center'
  },
  {
    title: '部门编码',
    key: 'deptCode',
    dataIndex: 'deptCode',
    checked: true,
    align: 'center'
  },
  {
    title: '类别',
    key: 'categoryCaption',
    dataIndex: 'paramCaption',
    checked: true,
    align: 'center'
  },
  {
    title: '备注',
    key: 'remark',
    dataIndex: 'remark',
    checked: true,
    align: 'center'
  }
];

const rightTableRef = ref(null);
const rightSearchParams = ref({});
const rightColumn = [
  {
    title: '序号',
    key: 'dataIndex',
    dataIndex: 'dataIndex',
    checked: true,
    align: 'center',
    width: 70
  },
  { title: '工艺名称', dataIndex: 'techName', key: 'techName', checked: true, align: 'center' },
  { title: '工艺类型', dataIndex: 'techType', key: 'techType', checked: true, align: 'center' },
  {
    title: '需过数',
    dataIndex: 'passOver',
    key: 'passOver',
    // customRender: ({ record }) => {
    //   return record.passOver ? '是' : '否';
    // },

    checked: true,
    align: 'center'
  },
  { title: '创建者', dataIndex: 'createBy', key: 'createBy', checked: true, align: 'center' },
  { title: '创建日期', dataIndex: 'createDate', key: 'createDate', width: 170, checked: true, align: 'center' },
  {
    title: '最后更改日期',
    dataIndex: 'updateDate',
    key: 'updateDate',
    width: 170,
    checked: true,
    align: 'center'
  }
];
</script>

<template>
  <div class="h-full w-full">
    <ARow class="h-full w-full" :gutter="15">
      <ACol :span="10" class="h-full">
        <Table
          ref="leftTableRef"
          v-model:searchParams="leftSearchParams"
          :column="leftColumn"
          :show-row-selection="false"
          row-key="id"
          :scroll="{ y: 'auto' }"
          :is-init-get-data="false"
          url="/mes/coppermaterial/list"
          :auto-generate-uuid="false"
          :is-pagination="false"
          class="h-full"
        ></Table>
      </ACol>
      <ACol :span="14" class="h-full">
        <Table
          ref="rightTableRef"
          v-model:searchParams="rightSearchParams"
          :column="rightColumn"
          :show-row-selection="false"
          row-key="id"
          :scroll="{ y: 'auto' }"
          :is-init-get-data="false"
          url="/mes/coppermaterial/list"
          :auto-generate-uuid="false"
          :is-pagination="false"
          class="h-full"
        >
          <template #title>工艺信息</template>
        </Table>
      </ACol>
    </ARow>
  </div>
</template>

<style lang="scss" scoped></style>
